package com.fengmi.controller;

import com.fengmi.dto.PageDTO;
import com.fengmi.entity.MallGoodsSpecOptions;
import com.fengmi.service.GoodsSpecOptionService;
import com.fengmi.vo.PageResoultVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@Api(tags = "商品规格管理")
@RequestMapping("spec")
@CrossOrigin
public class GoodsSpcOptionController {
    @Autowired
    private GoodsSpecOptionService goodsSpecService;

    @RequestMapping("/findPageSpec")
    @ResponseBody
    @ApiOperation("规格分页接口")
    public PageResoultVo<MallGoodsSpecOptions> page(@RequestBody @ApiParam("分页条件实体类") PageDTO<MallGoodsSpecOptions> pageDTO){

        return goodsSpecService.selectSpecOptionsByPage(pageDTO);
    }
}
